Skip to content

(WIP) OCPBUGS-141912 Remove dead TLS propagation code from controller - #6785

Draft
isabella-janssen wants to merge 1 commit into
openshift:mainfrom
isabella-janssen:ocpbugs-141912
Draft

isabella-janssen wants to merge 1 commit into
openshift:mainfrom
isabella-janssen:ocpbugs-141912

Conversation

@isabella-janssen

@isabella-janssen isabella-janssen commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Closes: OCPBUGS-141912

- What I did

This removes the dead TLS propagation code from StartMetricsListener in the controller. Because we are using ListenAndServe instead of ListenAndServeTLS, the TLS config was never used. See MCO-2644 for details on why the decision was to remove the code path instead of rework the functionality to allow for the use of ListenAndServeTLS.

- How to verify it

The existing test suites should continue passing to ensure no functionality was unintentionally broken. The tls-pqc-readiness test, specifically, should continue passing to ensure we are still compliant with the TLS expectations.

- Description for the changelog
OCPBUGS-141912 Remove dead TLS propagation code from controller

Summary by CodeRabbit

Summary

  • Updates
    • Metrics endpoints no longer use configurable TLS version, cipher suite, or curve preference settings. They now use standard HTTP server behavior. Metrics registration and shutdown behavior remain unchanged. The corresponding TLS options have also been removed from the controller and daemon startup configuration.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for commands.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 23, 2026
@openshift-ci

openshift-ci Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Walkthrough

The metrics listener no longer accepts TLS settings or configures a TLS server. The machine-config controller, machine-config daemon, and machine OS builder call it with the reduced argument list. Their deployment manifests no longer pass the removed TLS settings.

Changes

Metrics listener configuration

Layer / File(s) Summary
Update metrics listener behavior
pkg/controller/common/metrics.go
StartMetricsListener drops its TLS parameters and TLS server configuration. Its handler and listener lifecycle remain unchanged.
Remove TLS settings from callers and manifests
cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cmd/machine-os-builder/start.go, manifests/machineconfigcontroller/deployment.yaml, manifests/machineconfigdaemon/daemonset.yaml
The three commands remove the metrics TLS options and call the listener with its reduced argument list. The controller and daemon manifests remove the corresponding container arguments.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: djoshy, eric200428

Merge Risk: Minimal · previous review 4bcfa

This removes unused TLS configuration from the metrics listener, its callers and the deployment manifests, with no change to serving behavior. No merge-blocking risk was found.

Pre-merge checks: Passed 14

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: removing dead TLS propagation code from the controller. The raw summary shows the controller's StartMetricsListener losing its TLS min-version, cipher-suite, and curve…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names Passed The check applies to Ginkgo test titles (It, Describe, Context, When, and similar). The PR changes six files: four Go source files (cmd/machine-config-controller/start.go, cmd/machine-config-daemon/st…
Test Structure And Quality Passed The check applies to Ginkgo test code. The reviewed diff changes six files: cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cmd/machine-os-builder/start.go, pkg/controller/…
Microshift Test Compatibility Passed The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The PR changes six files: cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cm…
Single Node Openshift (Sno) Test Compatibility Passed The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The reviewed range changes six files: three cmd/*/start.go files, pkg/controller/common/metrics.go, and …
Topology-Aware Scheduling Compatibility Passed The check applies to changes that add or modify scheduling constraints. The PR diff (six files) only removes TLS-related code and arguments: the --tls-* flags in cmd/machine-config-controller, cmd/m…
Ote Binary Stdout Contract Passed The check applies to process-level stdout writes in OpenShift Tests Extension (OTE) test binaries. This PR changes six files: three cmd/*/start.go entry points for the MCO controller, daemon, and ma…
Ipv6 And Disconnected Network Test Compatibility Passed The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The changed-file inventory for refs/coderabbit/pre-merge-check/base..head lists six modified files: cmd/…
No-Weak-Crypto Passed The no-weak-crypto check flags use of MD5, SHA1, DES, RC4, 3DES, Blowfish, or ECB mode, custom crypto implementations, and non-constant-time comparison of secrets or tokens. The PR diff (base to head,…
Container-Privileges Passed The container-privileges check fails only when a manifest or code change adds or enables a privileged setting: privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, root without justification, o…
No-Sensitive-Data-In-Logs Passed The no-sensitive-data-in-logs check passes. I read the full patch across the six changed files. The only logging change is in pkg/controller/common/metrics.go. The startup log line changes from `Sta…
Full details: Title check

Explanation

The title names the main change: removing dead TLS propagation code from the controller. The raw summary shows the controller's StartMetricsListener losing its TLS min-version, cipher-suite, and curve-preference parameters, plus the related flag and manifest removals. The title also includes a Jira key, which is acceptable. It is a work-in-progress draft, which the title marks with (WIP), but the title still matches the changeset.

Full details: Stable And Deterministic Test Names

Explanation

The check applies to Ginkgo test titles (It, Describe, Context, When, and similar). The PR changes six files: four Go source files (cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cmd/machine-os-builder/start.go, pkg/controller/common/metrics.go) and two manifests (manifests/machineconfigcontroller/deployment.yaml, manifests/machineconfigdaemon/daemonset.yaml). The diff against refs/coderabbit/pre-merge-check/base contains no test files (no _test.go, /test/, or e2e paths). A search of added and removed diff lines found no It(, Describe(, Context(, When(, Entry(, or By( title constructs. The change removes TLS cipher-suite, minimum-version, and curve-preference propagation for the metrics listener. No Ginkgo test title is added or modified, so the check is not applicable and passes.

Full details: Test Structure And Quality

Explanation

The check applies to Ginkgo test code. The reviewed diff changes six files: cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cmd/machine-os-builder/start.go, pkg/controller/common/metrics.go, manifests/machineconfigcontroller/deployment.yaml, and manifests/machineconfigdaemon/daemonset.yaml. None of these is a test file. A search of the added lines for It(, g.It(, Describe(, Context(, Eventually, Consistently, BeforeEach, AfterEach, ginkgo, and ote. found no matches. The PR removes dead TLS flags and parameters and adds no new It blocks. The check is therefore not applicable, and it passes.

Full details: Microshift Test Compatibility

Explanation

The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The PR changes six files: cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cmd/machine-os-builder/start.go, pkg/controller/common/metrics.go, and two manifests (deployment.yaml, daemonset.yaml). It removes dead TLS flags and parameters from StartMetricsListener and related manifests. A search of added lines for Ginkgo constructs returned no matches, so the check does not apply and no MicroShift test compatibility concern is introduced.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The reviewed range changes six files: three cmd/*/start.go files, pkg/controller/common/metrics.go, and two manifest YAML files. It adds no Ginkgo constructs. A grep of the added lines for It(, Describe(, Context(, When(, DescribeTable(, and Entry( found no matches. The changes only remove TLS flags and parameters from the metrics listener and its deployment arguments. No new e2e test assumes a multi-node topology, so the check is not triggered.

Full details: Topology-Aware Scheduling Compatibility

Explanation

The check applies to changes that add or modify scheduling constraints. The PR diff (six files) only removes TLS-related code and arguments: the --tls-* flags in cmd/machine-config-controller, cmd/machine-config-daemon and cmd/machine-os-builder start.go, the TLS parameters of StartMetricsListener in pkg/controller/common/metrics.go, and the --tls-* args in manifests/machineconfigcontroller/deployment.yaml and manifests/machineconfigdaemon/daemonset.yaml. A search of the added lines for affinity, anti-affinity, topology spread, nodeSelector, tolerations, maxUnavailable, minAvailable, PodDisruptionBudget, replicas, node-role, control-plane, arbiter and ControlPlaneTopology returned no matches. The diff adds no scheduling constraint, so no topology assumption is introduced. The check does not apply, and the verdict is PASS.

Full details: Ote Binary Stdout Contract

Explanation

The check applies to process-level stdout writes in OpenShift Tests Extension (OTE) test binaries. This PR changes six files: three cmd/*/start.go entry points for the MCO controller, daemon, and machine-os-builder, one pkg/controller/common/metrics.go helper, and two manifests. It removes TLS cipher-suite, minimum-version, and curve-preference flags and parameters. None of the changed files is an OTE test binary. I searched the added lines for stdout-capable calls (fmt.Print*, os.Stdout, SetOutput, LogToStderr, klog, log.). The only match is klog.Infof("Starting metrics listener on %s", addr) inside StartMetricsListener. That line already existed. The PR only drops the with TLS min version text and one argument. The call runs in a goroutine from the controller and daemon start paths, not in main(), init(), or suite setup. No new stdout writes are added, and no stdout redirection is removed. No failure condition in the check is met.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The changed-file inventory for refs/coderabbit/pre-merge-check/base..head lists six modified files: cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cmd/machine-os-builder/start.go, pkg/controller/common/metrics.go, manifests/machineconfigcontroller/deployment.yaml, and manifests/machineconfigdaemon/daemonset.yaml. No test files are touched, and no added diff line contains a Ginkgo construct. The PR only removes TLS flags and arguments from the metrics listener and its manifests. The check is inapplicable, so it passes.

Full details: No-Weak-Crypto

Explanation

The no-weak-crypto check flags use of MD5, SHA1, DES, RC4, 3DES, Blowfish, or ECB mode, custom crypto implementations, and non-constant-time comparison of secrets or tokens. The PR diff (base to head, 6 files) adds none of these. - The added lines only change call sites and the StartMetricsListener signature. The function now takes (addr, stopCh, registerFunc) and starts a plain http.Server with ListenAndServe. - The removed lines are the --tls-cipher-suites, --tls-min-version, and --tls-curve-preferences flags, their deployment arguments, and the GetGoTLSConfig call that built a tls.Config. The crypto/tls import is also removed. - The removed TLS config was not used at runtime. The author states the listener used ListenAndServe, not ListenAndServeTLS, so the config never applied. The removal therefore does not weaken any algorithm in use. - No hashing, cipher, MAC, or token comparison code appears in the added or removed lines. Removing the unused TLS config is a separate concern from this check. The check does not cover whether the metrics endpoint should use TLS. That question is outside this policy.

Full details: Container-Privileges

Explanation

The container-privileges check fails only when a manifest or code change adds or enables a privileged setting: privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, root without justification, or allowPrivilegeEscalation: true. The PR changes six files (diffed against refs/coderabbit/pre-merge-check/base and head): - cmd/machine-config-controller/start.go, cmd/machine-config-daemon/start.go, cmd/machine-os-builder/start.go: remove TLS cipher-suite, min-version, and curve-preference flags. - pkg/controller/common/metrics.go: StartMetricsListener drops its TLS parameters and uses plain serving. - manifests/machineconfigcontroller/deployment.yaml and manifests/machineconfigdaemon/daemonset.yaml: remove only the --tls-* container args. I searched the added lines of the full diff for privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, runAsUser, runAsNonRoot, and capabilities. There were no matches. The manifest hunks contain only removed --tls-* arguments. No security-context or host-namespace setting is added or changed, so no privilege condition is introduced.

Full details: No-Sensitive-Data-In-Logs

Explanation

The no-sensitive-data-in-logs check passes. I read the full patch across the six changed files. The only logging change is in pkg/controller/common/metrics.go. The startup log line changes from Starting metrics listener on %s with TLS min version: %s to Starting metrics listener on %s. The removed value is a TLS minimum-version setting, such as VersionTLS12. It is not a credential, token, PII, session ID, or customer data. The logged listen address is unchanged and was already logged before this PR. The PR adds no new log statements. It removes TLS flags, the TLS config, and the related manifest arguments. No sensitive values flow into any log call.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 67df1d0 and 4bcfae6.

Files selected for processing: 6

  • cmd/machine-config-controller/start.go
  • cmd/machine-config-daemon/start.go
  • cmd/machine-os-builder/start.go
  • manifests/machineconfigcontroller/deployment.yaml
  • manifests/machineconfigdaemon/daemonset.yaml
  • pkg/controller/common/metrics.go
Files with no reviewable changes: 5

  • cmd/machine-config-controller/start.go
  • cmd/machine-config-daemon/start.go
  • cmd/machine-os-builder/start.go
  • manifests/machineconfigcontroller/deployment.yaml
  • manifests/machineconfigdaemon/daemonset.yaml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@isabella-janssen

Copy link
Copy Markdown
Member Author

/test tls-pqc-readiness

@openshift-ci

openshift-ci Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ptalgulk01 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@isabella-janssen

Copy link
Copy Markdown
Member Author

/test tls-pqc-readiness
/test all

@redhat-chai-bot

Copy link
Copy Markdown
Contributor

Chai risk assessment for c3f8dbe6817aebb3759e0e22712762c325c625ae → main

Tier: Moderate
Assessed: Moderate
Minimum: Low
Signals: 6 files, +7/-41 lines outside vendored and generated code; no API type changes; no CRD schema changes; full diff read.
Rubric: https://github.com/openshift-eng/ai-helpers/tree/8b588bd3c993913e6687fa7688ed6ac0c809e173/plugins/openshift-developer/skills/pr-risk-assessment

Reason: The PR removes the --tls-cipher-suites, --tls-min-version and --tls-curve-preferences flags from the machine-config-controller, machine-config-daemon and machine-os-builder binaries. It also drops those args from the MCC Deployment and MCD DaemonSet container specs and simplifies StartMetricsListener. The metrics endpoint should behave the same. The server already ran plain ListenAndServe, which never applied its TLSConfig. On main, the kube-rbac-proxy sidecars in both manifests use --upstream=http://127.0.0.1:8797 and keep their own TLS-profile flags, so TLS on the exposed port 9001 is unchanged. Clearing TLSNextProto does nothing for plain HTTP. This is still not Low. Changing the pod templates restarts the MCC once and rolls the MCD DaemonSet on every node; a restart only, with no drain or reboot. The new binaries also reject the removed flags. If anything still passes them, the MCD would crashloop on every node. A search of main found the flags only in the manifests this PR edits; the machine-config-server and criometricsproxy uses are separate flag sets. The tls-min-version check in the extended security test reads every container's args, so the rbac-proxy sidecar still satisfies it. No rendered MachineConfig templates, API types or CRDs change. That makes this a contained, one-time, non-disruptive restart of controllers and daemons rather than a node-disruptive change. The repository has no AGENTS.md on main.

Change it with @redhat-chai-bot /risk-tier <low|moderate|critical>: anyone can raise the tier; lowering it needs two OWNERS approvers and lasts until the next push.

/label chai-risk-assessment/moderate

@openshift-ci openshift-ci Bot added the chai-risk-assessment/moderate Chai risk assessment of the latest commit: moderate (may change product behaviour). label Nov 23, 2026
@openshift-ci

openshift-ci Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

@isabella-janssen: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit c3f8dbe link true /test unit
ci/prow/e2e-gcp-mco-upgrade c3f8dbe link false /test e2e-gcp-mco-upgrade

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chai-risk-assessment/moderate Chai risk assessment of the latest commit: moderate (may change product behaviour). do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants